package com.itheima.string;

//String类是特殊的,打印其对象名并不会直接得到其地址名,而是会得到其记录的真实内容
public class String01 {
    public static void main(String[] args) {
        String s1 = new String();//空参构造
        System.out.println(s1);
        char[] chs = {'a', 'b', 'c'};
        String s2 = new String(chs);//字符串数组的创建对象
        System.out.println(s2);
        String s3 = new String("abc");
        System.out.println(s3);
        byte[] bys = {97, 98, 99};//字节数组构造String对象
        String s4 = new String(bys);
        System.out.println(s4);
        String s5 = "abc";//直接构造
        System.out.println(s5);

    }
}